package com.itheima.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * <dl>
 * <dd>描述: ~节点业务逻辑实现</dd>
 * <dd>创建时间：  19:32 2020/3/11</dd>
 * <dd>创建人： zz</dd>
 * <dt>版本历史: </dt>
 * <pre>
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2020/3/11      guodong       1.0        1.0 Version
 * </pre>
 * </dl>
 */
@Component
public class TimeUtil {

    //@Scheduled(fixedRate = 5000,initialDelay = 10000)
    @Scheduled(cron = "*/5 * * * * ?")
    public void printNowTime(){
        System.out.println(LocalDateTime.now());
    }
}
